# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import math

from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_is_zero


class SupplementPlanMaterialRequirementWizard(models.TransientModel):
    _inherit = 's.supp.plan.material.requirement.wizard'

    # 补投
    # def action_plan_material_requirement(self):
    #     action = super().action_plan_material_requirement()
    #     if action.get('res_model', None) and action.get('res_model', None) == 'mrp.production':
    #         production_list = list(action.get('domain')[0])[-1]
    #         production_ids = self.env['mrp.production'].sudo().browse(production_list)
    #         for production in production_ids.filtered(lambda x: not x._get_sources()):
    #             production.with_delay(description="补投工单推送mes", priority=2).action_mes_production(split=True)
    #     return action

